package com.fingard.dsp.bank.directbank.wjzf02.hessian;

import java.net.MalformedURLException;

import cacps.UploadFileService;

import com.caucho.hessian.client.HessianProxyFactory;

public class CCPMUploadClient {
	static UploadFileService uploadFileService;

	public UploadFileService getUploadFileService(String p_url) {
		if(uploadFileService!=null)
			return uploadFileService;
		//系统测试环境
		//String url = "http://121.28.179.5:12342/cacps/uploadfileServer";
		
		HessianProxyFactory factory = new HessianProxyFactory();
		UploadFileService uploadFileService = null;
		try {
			uploadFileService = (UploadFileService) factory.create(
					UploadFileService.class, p_url);
		} catch (MalformedURLException e) {
			System.out.println("occur exception: " + e);
		}
		return CCPMUploadClient.uploadFileService = uploadFileService;
	}
}
